//文件流式读取
//1 引入fs模块
const fs = require('fs')
// 2 创建流式读取
let rs = fs.createReadStream('./观书有感.txt')
rs.on('data', (chunk) => {
  //每次读取64KB的数据
  console.log(chunk.toString())
  console.log(chunk.length)
})
rs.on('end', () => {
  console.log('读取完毕')
})
